import { Module, Global } from '@nestjs/common';
import { ConfigService } from './config.service';
function beforeAll() {
	let env = process.env.NODE_ENV;
	if (env !== 'production') {
        env = 'development';
    }
    return new ConfigService(`./env/development.env`)
}
@Global()
@Module({
    providers: [
        {
            provide: ConfigService,
            useValue: beforeAll(),
        }
    ],
    exports: [ConfigService],
})
export class ConfigModule {}
